package com.woniu34.upload.controller;

import com.woniu34.upload.service.FileUploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@CrossOrigin
@RestController
public class FileUploadController {


    @Autowired
    private FileUploadService fileUploadService;


    @RequestMapping("fileupload")
    public String upload(MultipartFile file){


        return fileUploadService.upload(file);
    }
}
